datablock TSShapeConstructor(BPzIVTurretDts) {
	baseShape  = "./BPzIVturret.dts";
	sequence0  = "./ptank_root.dsq root";
	sequence1  = "./ptank_root.dsq run";
	sequence2  = "./ptank_root.dsq walk";
	sequence3  = "./ptank_root.dsq back";
	sequence4  = "./ptank_root.dsq side";
	sequence5  = "./ptank_root.dsq crouch";
	sequence6  = "./ptank_root.dsq crouchRun";
	sequence7  = "./ptank_root.dsq crouchBack";
	sequence8  = "./ptank_root.dsq crouchSide";
	sequence9  = "./ptank_look.dsq look";
	sequence10 = "./ptank_root.dsq headside";
	sequence11 = "./ptank_root.dsq headUp";
	sequence12 = "./ptank_root.dsq jump";
	sequence13 = "./ptank_root.dsq standjump";
	sequence14 = "./ptank_root.dsq fall";
	sequence15 = "./ptank_root.dsq land";
	sequence16 = "./ptank_root.dsq armAttack";
	sequence17 = "./ptank_root.dsq armReadyLeft";
	sequence18 = "./ptank_root.dsq armReadyRight";
	sequence19 = "./ptank_root.dsq armReadyBoth";
	sequence20 = "./ptank_root.dsq spearready";  
	sequence21 = "./ptank_root.dsq spearThrow";
	sequence22 = "./ptank_root.dsq talk";  
	sequence23 = "./ptank_root.dsq death1"; 
	sequence24 = "./ptank_root.dsq shiftUp";
	sequence25 = "./ptank_root.dsq shiftDown";
	sequence26 = "./ptank_root.dsq shiftAway";
	sequence27 = "./ptank_root.dsq shiftTo";
	sequence28 = "./ptank_root.dsq shiftLeft";
	sequence29 = "./ptank_root.dsq shiftRight";
	sequence30 = "./ptank_root.dsq rotCW";
	sequence31 = "./ptank_root.dsq rotCCW";
	sequence32 = "./ptank_root.dsq undo";
	sequence33 = "./ptank_root.dsq plant";
	sequence34 = "./ptank_root.dsq sit";
	sequence35 = "./ptank_root.dsq wrench";
};

datablock PlayerData(BPzIVTurretPlayer : TankTurretPlayer) {
	shapeFile = "./BPzIVTurret.dts";
	
	uiName = "Blocko Panzer IV Turret";
	
	boundingBox       = vectorScale("3 3 1.7", 4);
	crouchBoundingBox = vectorScale("3 3 1.7", 4);
	
	protectPassengersBurn   = true;
	protectPassengersRadius = true;
	protectPassengersDirect = true;
	
	animLookLimitUp   = 0.2;
	animLookLimitDown = 0.6;
	
	armorMinimumDamage = 99;
	
	deathExplosionProjectile = BPzIVTurretExplosionProjectile;
	
	//numGuns = 1;
	//gunImage       [0] = BlockoTankGunImage;
	//gunSlot        [0] = 1;
	//gunOperatorSlot[0] = 0;
	//gunTrigger     [0] = 0;
	
	numFixedGuns = 1;
	fixedGunOperatorSlot [0] = 0;
	fixedGunTrigger      [0] = 0;
	fixedGunSlot         [0] = 1;
	fixedGunForwardOffset[0] = 0.5;
	fixedGunShotTimeMs   [0] = 10000;
	fixedGunIsAutomatic  [0] = 0;
	fixedGunProjectile   [0] = TankShellProjectile;
	fixedGunRecoilImpulse[0] = 1000;
	fixedGunFireSound    [0] = TankShotSound;
	fixedGunReadySound   [0] = "";
	fixedGunEmitterImage [0] = TankSmokeImage;
	fixedGunEmitterTimeMs[0] = 10000;
	fixedGunFireCallback [0] = "";
	fixedGunReadyCallback[0] = "";
	
	slotDisableTools[0] = 1;
};

datablock WheeledVehicleData(BPzIVVehicle : TankVehicle) {
	shapeFile = "./BPzIVHull.dts";
	
	numMountPoints = 3;
	mountThread[0] = "root";
	mountThread[1] = "root";
	mountThread[2] = "root";
	
	maxDamage = 450.00;
	destroyedLevel = 300.00;
	
	collDamageThresholdVel = 2.0;
	collDamageMultiplier   = 0.02;
	
	maxSteeringAngle = 0.9785;
	integration = 4;
	tireEmitter = VehicleTireEmitter;
	
	massCenter = "0 0 1";
	
	defaultTire = BlockoWW2TankTire;
	defaultSpring = BlockoWW2TankSpring;
	
	numWheels = 4;
	
	mass = 500;
	density = 5.0;
	drag = 1.6;
	bodyFriction = 0.6;
	bodyRestitution = 0.6;
	minImpactSpeed = 10;
	softImpactSpeed = 9;
	hardImpactSpeed = 13;
	groundImpactMinSpeed    = 10.0;
	
	engineTorque = 1000;
	engineBrake = 100;
	brakeTorque = 2000;
	maxWheelSpeed = 14;
	
	rollForce = 0;
	yawForce = 0;
	pitchForce = 0;
	rotationalDrag = 0.2;
	
	maxEnergy = 100;
	jetForce = 3000;
	minJetEnergy = 30;
	jetEnergyDrain = 2;
	
	uiName = "Blocko Panzer IV";
	rideable = true;
	lookUpLimit  = 0.5; //0.9;
	lookDownLimit = 0.5; //0.1;
	
	initialExplosionProjectile = tankExplosionProjectile;
	initialExplosionOffset = 1;
	burnTime = 4000;
	finalExplosionProjectile = tankFinalExplosionProjectile;
	finalExplosionOffset = 0.5;
	
	minRunOverSpeed    = 4;
	runOverDamageScale = 25;
	runOverPushScale   = 1.2;
	
	protectPassengersBurn   = true;
	protectPassengersRadius = true;
	protectPassengersDirect = true;
	
	armorMinimumDamage = 99;
	
	wheelSteering[0] = 0.8;
	wheelSteering[1] = 0.8;
	wheelSteering[2] = -0.4;
	wheelSteering[3] = -0.4;
	wheelPowered[0] = true;
	wheelPowered[1] = true;
	wheelPowered[2] = true;
	wheelPowered[3] = true;
	
	damageEmitter[0] = PlayerBurnEmitter;
	damageEmitterOffset[0] = "0 -3 2";
	damageLevelTolerance[0] = 0.5;
	damageEmitter[1] = VehicleBurnEmitter;
	damageEmitterOffset[1] = "0 -3 2";
	damageLevelTolerance[1] = 0.9;
	numDmgEmitterAreas = 1;
	
	numTurrets = 1;
	turretDatablock    [0] = BPzIVTurretPlayer;
	turretSlot         [0] = 1;
};

datablock DebrisData(BPzIVturretDebris) {
	emitters = "jeepDebrisTrailEmitter";
	
	shapeFile = "./BPzIVTurretDebris.dts";
	lifetime = 3.0;
	minSpinSpeed = -300.0;
	maxSpinSpeed = 300.0;
	elasticity = 0.5;
	friction = 0.2;
	numBounces = 1;
	staticOnMaxBounce = true;
	snapOnMaxBounce = false;
	fade = true;
	
	gravModifier = 2;
};

datablock ExplosionData(BPzIVTurretExplosion) {
	//explosionShape = "";
	lifeTimeMS = 150;
	
	soundProfile = vehicleExplosionSound;
	
	emitter[0] = vehicleExplosionEmitter;
	emitter[1] = vehicleExplosionEmitter2;
	
	debris = BPzIVturretDebris;
	debrisNum = 1;
	debrisNumVariance = 0;
	debrisPhiMin = 0;
	debrisPhiMax = 360;
	debrisThetaMin = 0;
	debrisThetaMax = 20;
	debrisVelocity = 18;
	debrisVelocityVariance = 3;
	
	faceViewer = true;
	explosionScale = "1 1 1";
	
	shakeCamera = true;
	camShakeFreq = "7.0 8.0 7.0";
	camShakeAmp = "10.0 10.0 10.0";
	camShakeDuration = 0.75;
	camShakeRadius = 15.0;
	
	lightStartRadius = 0;
	lightEndRadius = 20;
	lightStartColor = "0.45 0.3 0.1";
	lightEndColor = "0 0 0";
	
	impulseRadius = 15;
	impulseForce = 1000;
	impulseVertical = 2000;
	
	radiusDamage = 30;
	damageRadius = 8.0;
	
	playerBurnTime = 5000;
};

datablock ProjectileData(BPzIVTurretExplosionProjectile) {
	directDamage = 0;
	radiusDamage = 0;
	damageRadius = 0;
	explosion = BPzIVTurretExplosion;
	
	directDamageType = $DamageType::jeepExplosion;
	radiusDamageType = $DamageType::jeepExplosion;
	
	explodeOnDeath = 1;
	
	armingDelay = 0;
	lifetime = 10;
};
